package gui.entity;

import generated.domain.avatar.Avatar;

import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.ui.views.properties.IPropertySource;

public class AvatarEntity implements IAdaptable {
	private Avatar avatar;
	private Object avatarElementPropertySource;

	public AvatarEntity(Avatar pAvatar) {
		avatar = pAvatar;
	}

	public Object getAdapter(Class adapter) {
		if (adapter == IPropertySource.class) {
			if (avatarElementPropertySource == null) {
				avatarElementPropertySource = new AvatarElementPropertySource(
						this);
			}
			return avatarElementPropertySource;
		}
		return null;
	}

	/**
	 * @return the avatar
	 */
	public Avatar getAvatar() {
		return avatar;
	}
}